package com.fiberhome.nas.core.network.service

import com.fiberhome.nas.core.model.response.NetworkResponse
import com.fiberhome.nas.core.model.response.UploadResult
import okhttp3.MultipartBody
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part

interface FileService {

    /**
     * 上传文件
     */
    @Multipart
    @POST("api/v1/tscss/fs/file")
    suspend fun uploadFile(
        @Part("path") path: String,
        @Part("fileName") fileName: String,
        @Part("fileCreatedAt") fileCreatedAt: String,
        @Part("fileModifiedAt") fileModifiedAt: String,
        @Part("chunkOffset") chunkOffset: String,
        @Part("chunkSize") chunkSize: String,
        @Part("chunkNumber") chunkNumber: String,
        @Part("chunkHash") chunkHash: String,
        @Part("totalChunk") totalChunk: String,
        @Part("totalSize") totalSize: String,
        @Part("fileHash") fileHash: String,
        @Part("hashAlgorithm") hashAlgorithm: String,
        @Part("assetData") assetData: MultipartBody.Part
    ): NetworkResponse<UploadResult>

}